/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao;
 
import com.legendshop.dao.Dao;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.dto.WeekLogReport;
import com.legendshop.oa.model.WeekLog;

import java.util.Date;
import java.util.List;

/**
 * 周报Dao接口
 */
public interface WeekLogDao extends Dao<WeekLog, Long> {
	/**
	 *  根据商城获取周报列表
	 */
    public abstract List<WeekLog> getWeekLog(String shopName);

   	/**
	 *  根据Id获取周报
	 */
	public abstract WeekLog getWeekLog(Long id);
	
   /**
	 *  删除周报
	 */
    public abstract int deleteWeekLog(WeekLog weekLog);
    
   /**
	 *  保存周报
	 */	
	public abstract Long saveWeekLog(WeekLog weekLog);

   /**
	 *  更新周报
	 */		
	public abstract int updateWeekLog(WeekLog weekLog);
	
   /**
	 *  查询周报列表
	 */		
    public abstract PageSupport<WeekLog> getWeekLogByLeaderUserNameDate(String leaderName, String curPageNO, String name, String realName, Date startDate, Date endDate);

    /**
          * 加载周报
     * @param userName
     * @param year
     * @param weekNo
     * @return
     */
    public abstract WeekLog getWeekLog(String userName, Integer year, Integer weekNo);

    /**
          * 获取周报
     * @param curPageNO
     * @param userName
     * @param year
     * @param weekNo
     * @return
     */
	public abstract PageSupport<WeekLog> getWeekLogByUserYearWeek(boolean isAdmin, String leaderName, String curPageNO, String userName, Integer year, Integer weekNo);
	
	/**
	 *  获取用户的周报,查询下属的周报
	 * @param curPageNO 页码
	 * @param year 年
	 * @param weekNo 第几周
	 * @return
	 */
	public abstract PageSupport<WeekLog> getWeekLogByLeaderYearWeek(boolean isAdmin, String leaderName, String curPageNO, Integer year, Integer weekNo);

	/**
	 * 查找是否是我的下级
	 * @param leaderName
	 * @param userName
	 * @return
	 */
	public abstract boolean isMycolleague(String leaderName, String userName);

    List<WeekLogReport> getWeekLogReport(WeekLog weekLog);
}
